﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BegEntities;

namespace CsharpMailApplikation
{
    public static class Extension
    {
        public static List<Email> SortByDate(this List<Email> toSort)
        {
            toSort.Sort((a, b) => b.Date.CompareTo(a.Date)); //Sorterar den nuvarande listan med mail fallande (senaste först)

            return toSort;
        }
    }
}
